#include "stdint.h"
#include "adc.h"
#include "filter.h"
typedef struct
{
    float adc1_bias;
	  float adc2_bias;
	  float adc3_bias;
	  float adc4_bias;
	  float adc5_bias;
	  float adc1_k;
	  float adc2_k;
	  float adc3_k;
	  float adc4_k;
	  float adc5_k;
}bias;
typedef struct
{
    float cap_current;
	  float cap_voltage;
	  float battery_current;
	  float battery_voltage;
	  float cap_power;
	  float battery_power;
	  float chassis_power;
}power;

#define ad1_bias 0;
#define ad2_bias -22.013;
#define ad3_bias -14.705;
#define ad4_bias 0;
#define ad5_bias -12.30611;
#define ad1_k   20;
#define ad2_k   12.844;
#define ad3_k   8.6303;
#define ad4_k   20;
#define ad5_k   7.18833;
void get_4_adc(uint16_t adc1[],power *p);
void get_chassis_adc(uint16_t adc1[],power *p);
void set_adc(uint16_t adc1[],bias *adc,float adcvalue[]);
void init_bias(bias *adc);
void get_power(power *p,float adcvalue[]);
